package org.adultedu.dao;

import org.adultedu.pojo.Student;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface StudentMapper {

    //查询所有学生
    List<Student> queryAllStudent();

    //查询特定的学生
    List<Student> queryUniqueStudent(Student student);

    List<Student> queryLimitStudent(@Param("name")String name,@Param("sfz") String sfz,@Param("tele")String tele,@Param("email")String email,@Param("currentpage")Integer currentpage,@Param("pagesize")Integer pagesize);

    Integer getStuNum(@Param("name")String name,@Param("sfz") String sfz,@Param("tele")String tele,@Param("email")String email);

    //修改学生信息
    int updateStudent(Student student);

    //插入学生信息
    int insertStudent(Student student);

    //删除学生记录
    int deleteStudent(@Param("sid") String sid);

    //得到身份证
    String getSfzBySid(@Param("sid") String sid);

    // 重置学生账户
    int resetStudentAccount(@Param("sid") String sid,@Param("pwd") String pwd);

    //封禁学生账户
    int disableAccount(@Param("sid") String sid,@Param("reason")String reason,@Param("other") String other);

    //解封学生账户
    int enableAccount(@Param("sid") String sid);

    List getSaleStudent(@Param("cid")String cid);
}
